typedef struct Node Node;
Node* copyRandomList(Node* head) {
    Node* cur = head;
    while (cur)//尾插复制节点
    {
        Node* CopyNode = (Node*)malloc(sizeof(Node));
        CopyNode->val = cur->val;
        CopyNode->next = cur->next;
        cur->next = CopyNode;
        cur = cur->next->next;
    }
    //随机指针
    cur = head;
    while (cur) {//进行指向，注意指向的是拷贝
        Node* cpy = cur->next;
        if (cur->random == NULL) {//空的话无法
            cpy->random = NULL;
        }
        else { cpy->random = cur->random->next; }
        cur = cur->next->next;
    }
        //链表拆分
    cur = head;
    Node* newNOde = NULL;
    Node* tail = NULL;
    while (cur)
    {
        Node* CopyNode = cur->next;
        Node* next = CopyNode->next;
        if (tail == NULL)
        {
            tail = CopyNode;
            newNOde = CopyNode;
        }
        else
        {
            tail->next = CopyNode;
            tail = tail->next;
        }
        cur->next = next;
        cur = next;
    }
    return newNOde;
}